package com.atguigu.yygh.repository;

import com.atguigu.yygh.model.hosp.Hospital;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zr
 * @date 2021/12/12 16:08
 */
@Repository
public interface HospitalRepository extends MongoRepository<Hospital, String> {
    /**
     * 判断数据库中的数据是否存在
     *
     * @param hoscode
     * @return
     */
    Hospital getHospitalByHoscode(String hoscode);

    /**
     * 根据医院名称进行模糊查询
     *
     * @param hosName
     * @return
     */
    List<Hospital> findHospitalByHosnameLike(String hosName);

}
